home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Skunkware 5
/
Skunkware 5.iso
/
src
/
X11
/
Desktop
/
Install
< prev
next >
Wrap
Text File
|
1995-07-16
|
1KB
|
76 lines
:
# Install - shell script to install these desktop configuration files
# in a user's home directory
#
# Author - Ronald Joe Record (rr@sco.com)
#
# Date - 24 June 1995
#
# Useage - Install [startx | xdt | pmwm]
#
FILE_LIST="Pmwm .pmwmrc .mailcap Main.dt Personal.dt trash.dt"
DIR_LIST=".xdt_dir .odtpref"
Useage() {
echo "Useage : Install [startx | xdt | pmwm]"
exit 2
}
CopyFunc() {
[ "$1" = "" ] && {
echo "Install: $0 : Fatal Error !! No argument. Exiting."
exit 1
}
if [ -s $HOME/$1 ]
then
echo "There is already a $HOME/$1 ."
echo "Would you like to back the current one up and"
echo "install the new one ? (y/n)\c"
read ans
if [ "$ans" = "y" ] || [ "$ans" = "Y" ]
then
echo "Backing up current $1 as $1.bak"
mv $HOME/$1 $HOME/$1.bak
copy -mr $1 $HOME/$1
else
echo "Would you like to overwrite the current $1 ? (y/n)\c"
read ans
if [ "$ans" = "y" ] || [ "$ans" = "Y" ]
then
rm -rf $HOME/$1
copy -mr $1 $HOME/$1
else
echo "No new $1 will be installed at this time."
fi
fi
else
copy -mr $1 $HOME/$1
fi
}
[ $# = 0 ] || {
case $1 in
startx)
FILE_LIST=".startxrc"
DIR_LIST=""
;;
xdt)
FILE_LIST=""
;;
pmwm)
DIR_LIST=""
;;
*)
Useage
;;
esac
}
for i in $FILE_LIST $DIR_LIST
do
CopyFunc $i
done
exit 0